package com.admin_account_main.controller;

import com.admin_account_main.pojo.vo.GetUserStatusVO;
import com.admin_account_main.service.AdminAccountService;
import com.common.result.JsonResult;
import com.common.result.ResultEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("v1/admin/account")
public class AdminUserController {
    @Autowired
    private AdminAccountService adminAccountService;

    @PostMapping("getUserStatus")
    public JsonResult getUserStatus(long uid){

        GetUserStatusVO getUserStatusVO = adminAccountService.getUserStatus(uid);
        if (getUserStatusVO!=null){
            return new JsonResult(ResultEnum.SECCESS,getUserStatusVO);
        }else {
            return new JsonResult(ResultEnum.GET_USER_STATUS_FAILED);
        }

    }







}
